/**
 * Perform the element default action.
 *
 * @param {JSEvent} event the event that triggered the action
 *
 * @properties={typeid:24,uuid:"BD084BF3-B8FE-4A6F-92A8-0DE5BAA7DA69"}
 */
function aceptar(event) {
	if (databaseManager.saveData())
	{
		databaseManager.setAutoSave(true)
		var $win = application.getWindow('ALTA_PAGADORES')
		$win.hide()
		$win.destroy()
	}
	else
	{
		globals.DIALOGS.showErrorDialog('Error','Ocurrio un error','OK')
	}
}

/**
 * Perform the element default action.
 *
 * @param {JSEvent} event the event that triggered the action
 *
 * @properties={typeid:24,uuid:"34C474CB-0647-4CC8-BF10-B3AB95DBE12C"}
 */
function cancelar(event) {
	databaseManager.revertEditedRecords()
	databaseManager.setAutoSave(true)
	var $win = application.getWindow('ALTA_PAGADORES')
	$win.hide()
	$win.destroy()
}

/**
 * Callback method for when form is shown.
 *
 * @param {Boolean} firstShow form is shown first time after load
 * @param {JSEvent} event the event that triggered the action
 *
 * @private
 *
 * @properties={typeid:24,uuid:"A15F44E3-1316-4F0D-8C17-A2D9B72A6AC2"}
 */
function onShow(firstShow, event) {
	elements.fld_razon_social.requestFocus()
}
